package com.example.dingdong.daomain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 
 * @ClassName: OrderRecordEntity
 * @Description: 订单实体
 * @Author :chengwenixng
 * @DateTime 2021-06-04 09:47:16
 */
@Entity
@Table(name ="orderrecord_entity")
public class OrderRecordEntity implements Serializable{
	private static final long serialVersionUID = 1L;

	/**
	 * 数据库自增长ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	/**
	 * 删除标识
	 */
	private boolean delFlag = true;
	
	/**
	 * 订单编号
	 */
	private String oriderNumber;
	
	/**
	 * 总价格/(元)
	 */
	private double totalPrice;
	
	/**
	 * 订单状态(0:已完成;1:已接单;2:制作中;3:已签收;4:未签收,5：待商家接单)
	 */
	private String status;
	/**
	 * 创建时间
	 */
	private Date ceckingInTime = new Date();
	
	/**
	 * 菜品-订单（多对一）
	 */
	@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	private MenuEntity menuEntity;
	
	/**
	 * 订单-用户(多对一)
	 */
	@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	private BasicUserEntity basicUserEntity; 
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public boolean isDelFlag() {
		return delFlag;
	}
	public void setDelFlag(boolean delFlag) {
		this.delFlag = delFlag;
	}
	public String getOriderNumber() {
		return oriderNumber;
	}
	public void setOriderNumber(String oriderNumber) {
		this.oriderNumber = oriderNumber;
	}
	public double getTotalPrice() {
		return totalPrice;
	}
	public void setTotalPrice(double totalPrice) {
		this.totalPrice = totalPrice;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public Date getCeckingInTime() {
		return ceckingInTime;
	}
	public void setCeckingInTime(Date ceckingInTime) {
		this.ceckingInTime = ceckingInTime;
	}
	
	public MenuEntity getMenuEntity() {
		return menuEntity;
	}
	public void setMenuEntity(MenuEntity menuEntity) {
		this.menuEntity = menuEntity;
	}
	public BasicUserEntity getBasicUserEntity() {
		return basicUserEntity;
	}
	public void setBasicUserEntity(BasicUserEntity basicUserEntity) {
		this.basicUserEntity = basicUserEntity;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	} 
}
